package com.sample.oraclejdbc.repository;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class TbAgentRepository {
	
	@Autowired
	private JdbcTemplate jdbcTemplate;
	
	public List<Map<String, Object>> selectList() {
		final String sql = "select CAGENTID as agentId, CAGENTNAME as agentName from tb_agent";
		return jdbcTemplate.queryForList(sql);
	}

}
